﻿@model Windvoice.Albums.Photo

@{
    ViewBag.Title = "Photo Edit";
    Layout = "~/Areas/Manage/Views/Shared/_Layout.cshtml";
}

@section headSection{
    <script src="@Url.Content("~/Content/js/jquery.validate.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/js/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('img.photo').redraw(320, 180);


        });
    </script>
}

<div class="pagetitle">
    <h2>编辑照片</h2>
    <div class="pagefunctions">
        <a href="/manage/album/detail/@Model.AlbumID">返回相册</a>
    </div>    
</div>

@using (Html.BeginForm("edit", "photo", FormMethod.Post, new { @class = "dataform" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>照片信息</legend>
              
        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            照片
        </div>
        <div class="editor-field">
            <img src="@Model.Path" class="photo" />
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description, new {style="width:60em;height:5em" })
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        
        <p>
            <input type="submit" value="提交" class="submitbutton" />
        </p>
    </fieldset>
}